﻿/*============================================================================================
	TASK 4:                                                       { Operators and Expressions}
	Write an expression that checks for given integer if its third digit (right-to-left) is 7.
    E. g. 1732 => true.    
============================================================================================*/

using System;

class CheckThirdDigit7orNot
{
    static void Main()
    {
        int a = -21121731;
        bool thirdDigit = (Math.Abs(a) % 1000) / 100 == 7;

        if (thirdDigit)
        {
            Console.WriteLine("Third digit is:7");
        }

        else
        {
            Console.WriteLine("Third digit isn't:7");
        }
    }
}

